<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="AddModel.aspx.cs" Inherits="AddModel" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    &nbsp;
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:GSMConnectionString %>"
        SelectCommand="SELECT * FROM [GSM]" DeleteCommand="DELETE FROM [GSM] WHERE [GsmID] = @GsmID" InsertCommand="INSERT INTO [GSM] ([Model], [Description]) VALUES (@Model, @Description)" UpdateCommand="UPDATE [GSM] SET [Model] = @Model, [Description] = @Description WHERE [GsmID] = @GsmID">
        <DeleteParameters>
            <asp:Parameter Name="GsmID" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="Model" Type="String" />
            <asp:Parameter Name="Description" Type="String" />
            <asp:Parameter Name="GsmID" Type="Int32" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="Model" Type="String" />
            <asp:Parameter Name="Description" Type="String" />
        </InsertParameters>
    </asp:SqlDataSource>
    <asp:DetailsView ID="DetailsView1" runat="server" AllowPaging="True" AutoGenerateRows="False"
        BackColor="White" BorderColor="#999999" BorderStyle="None" BorderWidth="1px"
        CellPadding="3" DataKeyNames="GsmID" DataSourceID="SqlDataSource1" DefaultMode="Insert"
        GridLines="Vertical" Height="50px" HorizontalAlign="Center" Width="200px">
        <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
        <EditRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
        <RowStyle BackColor="#EEEEEE" ForeColor="Black" />
        <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
        <Fields>
            <asp:BoundField DataField="GsmID" HeaderText="GsmID" InsertVisible="False" ReadOnly="True"
                SortExpression="GsmID" />
            <asp:BoundField DataField="Model" HeaderText="Model" SortExpression="Model" />
            <asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description" />
            <asp:CommandField ShowDeleteButton="True" ShowInsertButton="True" />
        </Fields>
        <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
        <AlternatingRowStyle BackColor="#DCDCDC" />
    </asp:DetailsView>
</asp:Content>

